<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="#0A5AF9">
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" href="../css/aui.css" />
    <link rel="stylesheet" href="../css/mui.css" />
    <link rel="stylesheet" href="../css/public-head.css" />
    <link rel="stylesheet" type="text/css" href="../css/VehicleList.css"/>
</head>

<body>
    <div class="Zhangice" id="val_list">
        <!-- <div class="br">
      <div class="car-t" tapmode onclick="archives()">
        <div><img src="../image/icon/fchelogo@2x.png" alt="" /></div>
      <div>
          <div>桂A·75N17</div>
          <div>青秀区-建政街道-青秀万达银座负二楼A区06号车位</div>
      </div>
      <div class="mo"></div>
      </div>
    </div> -->
    </div>
    <div class="valicle-1" >
        <div class="imgg"><img src="../image/icon/fPLUS@2x.png" /></div>
        &nbsp;
        <div class="aaa"><a href="../html/AddVehicle.html">添加新的车辆</a></div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/public-head.js"></script>
<script type="text/javascript" src="../script/aui-slide.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/mui.js"></script>
<script type="text/javascript" src="../script/rem.js"></script>
<script type="text/javascript" src="../script/template-web.js"></script>
<script id="valicleList" type="text/html">

    <div class="user_msg">
        <div>
            <div class="val-1"><span>已备案爱车&nbsp;(2/2)</span></div>
        </div>
        {{each data}}
        <div class="br">
            <div class="car-t" tapmode onclick="archives()">
                <div><img src="../image/icon/fchelogo@2x.png" alt="" /></div>
                <div>
                    <div>{{$value.car_number}}</div>
                    <div>{{$value.area}}</div>
                </div>
                <div class="mo">
                    <div><img src="../image/icon/GX1@2x.png" alt="" /></div>
                    <div>默认</div>
                </div>
            </div>
        </div>
        {{/each}}
    </div>

</script>

<script type="text/javascript">
    apiready = function() {
        init();
        fnvalicleList();
    }
    headInner({
        title: "车辆列表",
        //headleft
        headl: '<a href="#" style="color:white" class="mui-icon mui-icon-left-nav" tapmode onclick="api.closeWin()"></a>',
        //headright
        headr: '<a style="color:white"></a>',
        color: "", //默认是蓝色
        padding: "0px 0px 0px",
    })

    function mine_2() {
        api.openWin({
            name: 'mine_2',
            url: '../html/mine_2.html'
        });
    }

    function archives() {
        api.openWin({
            name: 'archives',
            url: '../html/archives.html'
        });
    }

    // function AddVehcle() {
    //     api.openWin({
    //         name: 'AddVehicle',
    //         url: '../html/AddVehicle.html',
    //         pageParam: {
    //             name: 'test'
    //         }
    //     });
    //
    // }
    //我的车辆列表
    function fnvalicleList() {
        // console.log(123124124);
        BASE.MYajax({
            'pathName': 'userCar/index', //请求路径
            'method': backData //调用函数
        });
        function backData(ret, err) {
            if (ret.code == 200) {
                // console.log("数据"+JSON.stringify(ret));
                var html = template('valicleList', ret); //绑定htmlid
                document.getElementById('val_list').innerHTML = html; //绑定模板id
            } else {
                reToast(ret, err)
            }
        };
    }
</script>

</html>
